.class Lcom/tendcloud/tenddata/fm$b;
.super Ljava/lang/Object;


# static fields
.field private static volatile g:Lcom/tendcloud/tenddata/fm$b;


# instance fields
.field a:Ljava/lang/String;

.field b:I

.field c:I

.field d:I

.field e:Ljava/util/HashMap;

.field f:Ljava/util/HashMap;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/4 v0, 0x0

    sput-object v0, Lcom/tendcloud/tenddata/fm$b;->g:Lcom/tendcloud/tenddata/fm$b;

    return-void
.end method

.method private constructor <init>()V
    .locals 2

    const/4 v1, 0x0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const-string v0, "Analytics"

    iput-object v0, p0, Lcom/tendcloud/tenddata/fm$b;->a:Ljava/lang/String;

    iput v1, p0, Lcom/tendcloud/tenddata/fm$b;->b:I

    const/16 v0, 0xa

    iput v0, p0, Lcom/tendcloud/tenddata/fm$b;->c:I

    iput v1, p0, Lcom/tendcloud/tenddata/fm$b;->d:I

    return-void
.end method

.method static a()Lcom/tendcloud/tenddata/fm$b;
    .locals 1

    const/4 v0, 0x0

    invoke-static {v0}, Lcom/tendcloud/tenddata/fm$b;->a(Ljava/lang/String;)Lcom/tendcloud/tenddata/fm$b;

    move-result-object v0

    return-object v0
.end method

.method static a(Ljava/lang/String;)Lcom/tendcloud/tenddata/fm$b;
    .locals 6

    if-eqz p0, :cond_0

    invoke-virtual {p0}, Ljava/lang/String;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_1

    :cond_0
    sget-object v0, Lcom/tendcloud/tenddata/fm$b;->g:Lcom/tendcloud/tenddata/fm$b;

    :goto_0
    return-object v0

    :cond_1
    sget-object v0, Lcom/tendcloud/tenddata/fm$b;->g:Lcom/tendcloud/tenddata/fm$b;

    if-nez v0, :cond_5

    const-class v1, Lcom/tendcloud/tenddata/fm$b;

    monitor-enter v1

    :try_start_0
    sget-object v0, Lcom/tendcloud/tenddata/fm$b;->g:Lcom/tendcloud/tenddata/fm$b;

    if-nez v0, :cond_4

    new-instance v0, Lcom/tendcloud/tenddata/fm$b;

    invoke-direct {v0}, Lcom/tendcloud/tenddata/fm$b;-><init>()V

    sput-object v0, Lcom/tendcloud/tenddata/fm$b;->g:Lcom/tendcloud/tenddata/fm$b;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :try_start_1
    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2, p0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    if-eqz v2, :cond_4

    sget-object v0, Lcom/tendcloud/tenddata/fm$b;->g:Lcom/tendcloud/tenddata/fm$b;

    const-string v3, "Status"

    invoke-virtual {v2, v3}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v3

    iput v3, v0, Lcom/tendcloud/tenddata/fm$b;->b:I

    sget-object v0, Lcom/tendcloud/tenddata/fm$b;->g:Lcom/tendcloud/tenddata/fm$b;

    const-string v3, "MaxSize"

    invoke-virtual {v2, v3}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v3

    iput v3, v0, Lcom/tendcloud/tenddata/fm$b;->c:I

    sget-object v0, Lcom/tendcloud/tenddata/fm$b;->g:Lcom/tendcloud/tenddata/fm$b;

    const-string v3, "networkFilter"

    invoke-virtual {v2, v3}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v3

    iput v3, v0, Lcom/tendcloud/tenddata/fm$b;->d:I

    const-string v0, "Elements"

    invoke-virtual {v2, v0}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v3

    if-eqz v3, :cond_3

    const/4 v0, 0x0

    :goto_1
    invoke-virtual {v3}, Lorg/json/JSONArray;->length()I

    move-result v4

    if-ge v0, v4, :cond_3

    invoke-virtual {v3, v0}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v4

    if-eqz v4, :cond_2

    invoke-static {v4}, Lcom/tendcloud/tenddata/fm$b;->a(Lorg/json/JSONObject;)V

    :cond_2
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    :cond_3
    const-string v0, "UserDefines"

    invoke-virtual {v2, v0}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v2

    if-eqz v2, :cond_4

    invoke-virtual {v2}, Lorg/json/JSONObject;->keys()Ljava/util/Iterator;

    move-result-object v3

    :goto_2
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_4

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    sget-object v4, Lcom/tendcloud/tenddata/fm$b;->g:Lcom/tendcloud/tenddata/fm$b;

    iget-object v4, v4, Lcom/tendcloud/tenddata/fm$b;->f:Ljava/util/HashMap;

    invoke-virtual {v2, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v0, v5}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_1
    .catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_2

    :catch_0
    move-exception v0

    :cond_4
    :try_start_2
    monitor-exit v1
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    :cond_5
    sget-object v0, Lcom/tendcloud/tenddata/fm$b;->g:Lcom/tendcloud/tenddata/fm$b;

    goto :goto_0

    :catchall_0
    move-exception v0

    :try_start_3
    monitor-exit v1
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    throw v0
.end method

.method private static a(Lorg/json/JSONObject;)V
    .locals 3

    if-eqz p0, :cond_0

    :try_start_0
    new-instance v0, Lcom/tendcloud/tenddata/fm$a;

    invoke-direct {v0}, Lcom/tendcloud/tenddata/fm$a;-><init>()V

    invoke-virtual {v0, p0}, Lcom/tendcloud/tenddata/fm$a;->a(Lorg/json/JSONObject;)V

    sget-object v1, Lcom/tendcloud/tenddata/fm$b;->g:Lcom/tendcloud/tenddata/fm$b;

    iget-object v1, v1, Lcom/tendcloud/tenddata/fm$b;->e:Ljava/util/HashMap;

    iget-object v2, v0, Lcom/tendcloud/tenddata/fm$a;->a:Ljava/lang/String;

    invoke-virtual {v1, v2, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :cond_0
    :goto_0
    return-void

    :catch_0
    move-exception v0

    goto :goto_0
.end method
